package reflect;

import java.lang.reflect.Field;

public class ReflectDemo8 {
    public static void main(String[] args) throws Exception {
        String s1 = "abc";
        String s2 = "abc";
        Class<String> c = String.class;
        Field f = c.getDeclaredField("value");
        f.setAccessible(true);
        f.set(s1, new char[]{'d', 'e', 'f'});
        String s3 = "abc";
        System.out.println(s2);
        System.out.println(s3);
    }
}
